<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="description" content="">
    <link rel="stylesheet" type="text/css" href="../addons/haoman_dpm/images/main.css?v=222">
    <link rel="stylesheet" href="../addons/haoman_dpm/mobimg/dropload.min.css?v=20161124170424" />
    <title>个人中心</title>
    <style type="text/css" id="_zoom"></style>
    <style type="text/css">
    html,body{}
    .power-by{ font-size:0.8rem; text-align:center; line-height:20px; color:#EAB387;}
    .pui_clear{border-radius: 50%;width: 100px;height: 100px;position: relative;left: 50%;margin-left: -60px;top: 5px;margin-bottom: 15px;}
    .ranking_table {width: 100%;margin:10px 0 0 0;border: none;padding: 0;}
    .ranking_table tbody tr {border-bottom: 1px dashed #2b9443;width: 100%;padding: 0;margin: 0;color: #fede2d;}
    .ranking_table tr td {display: inline-block;text-align: center;width: 25%;font-size: 1.0em;padding: 0.6em 0;overflow: hidden;white-space: nowrap;margin: 0;text-overflow: ellipsis;}
    body{background-image: url({$bg});background-repeat: no-repeat;background-size: 100% auto;background-attachment:fixed;background-color: #c40001;}
    /*.menulist .menu_item5 {
        border-top: 6px solid rgb(255, 207, 13);
    }
    .menulist div a img {
        margin-bottom: 2px;
    }*/
    </style>
</head>

<body>
    <div class="page_lz">

        <div class="pui_user userinfo" style="margin-top: 30px;">
            <div class="pui_user_top">
                <div class="pui_user_top_photo pui_clear">
                    <img src="{if empty($fans['avatar'])}../addons/haoman_dpm/images/item8.jpg{else}{$fans['avatar']}{/if}" class="pui_circle" style="border-radius: 50%;width:100px;height: 100px;"/>
                   {if $reply['k_templateid']==1} <div style="height: 20px;width:90px;position: relative;top:-25px;background-color: rgba(0,0,0,0.5);left: 50%;margin-left: -45px;border-radius: 3px;text-align: center;color: #fff;font-size: 12px;line-height: 20px;">第{$fans['awardingid']}个签到</div>{/if}
                </div>
                <div class="name" style="width: 100%;text-align: center;margin-bottom: 10px;color: #fff">{$fans['nickname']}</div>
            </div>
            <div style="" id="mymoney">
                <ul style="width: 100%;list-style: none;height: 35px;margin: 0px;padding: 0px;">
                    <li style="float: left;width: 33.333%;height: 35px;line-height: 35px;text-align: center">账户余额：</li>
                    <li style="float: left;width: 33.333%;height: 35px;line-height: 35px;color: #fff;text-align: center" ><span id="money">{php echo $nums/100}</span>元</li>
                    <li style="float: left;width: 33.333%;height: 35px;line-height: 35px;text-align: center">{if $nums>=$num}<button class="btn btn-success" id="butt" style="background: green;color: #fff;border: none;height:30px;width: 60px;border-radius: 3px;">提现</button>{/if}</li>
                </ul>
                {if $numx!=0}
                <div style="width: 100%;"><label style="width: 33.33%;display: inline-block;text-align: center">提现中金额：</label><span style="color: #fff;">{php echo $numx/100}元</span></div>
                {/if}
            </div>
        </div>

        <div class="tabless">
            <table class="ranking_table">
                <thead></thead>
                <tbody id="loading" >
                    <tr style="background: rgba(0,0,0,0.2);color: #fff">
                        <td style="width:60%;">奖品</td>
                        <td style="width:25%;">时间</td>
                        <td style="width:15%">状态</td>
                    </tr>
                    {loop $mybobing $row}
                    <tr style="font-size: 12px;">
                      <td style="width: 60%">{if $row['turntable'] == 1}[抽奖]{/if}{if $row['turntable'] == 2}[抢红包{$row['hbpici']}]{/if}
                      {$row['awardname']}{if !empty($row['credit'])}(金额:{php echo $row['credit']/100}){/if}{if !empty($row['jifen'])}({php echo $row['jifen']}分){/if}</td>
                      <td style="width:25%;">{php echo date('m/d H:i',$row['createtime'])}</td>
                      <td style="width: 15%"><strong>{if $row['prizetype']==2&&$row['status']!=2}<button class="btn btn-success duijiang" data-id="{$row['id']}" data-djtitle="{$row['title']}" style="background: #d9534f;color: #fff;height: 20px;border: none">兑奖</button>{elseif $row['status']==1}未兑奖{else}已兑奖{/if}</strong></td>
                    </tr>
                   {/loop}
                </tbody>
            </table>
        </div>
        {if $mybb ==1}
        <div class="help" style="width: 100%;text-align: center;margin-top: 10px;color: #999">暂无数据...</div>
        {/if}
   
      
    </div>

    <!--兑奖密码-->

    <div class="power-by" style="position: fixed;bottom: 50px;width: 100%;left: 0px;right: 0px;font-size: 12px;text-align: center">
        <div class="copyright fixed">{if empty($reply['copyright'])} &copy;{$_W['account']['name']}{else}&copy;{$reply['copyright']}{/if}</div>
    </div>

    <div class="mask" style="z-index: 999998;position: fixed;top: 0px;left: 0px;right: 0px;bottom: 0px;background: rgba(0,0,0,0.95);display: none;width: 100%;height: 100%">
    <div style="z-index: 999999;width:80% ;margin-left:10%;margin-top: 25%;text-align: center;background: rgba(255, 255, 255, 0.6);display: block;border-radius: 3px;"class="point">
       
        <input type="number" placeholder="请输入后台设置的兑奖密码" style="background: #fff;height: 30px;border: none;width: 80%;border-radius: 2px;margin-top: 30px;{if $reply['password']==0}display: none{/if}" class="numx">
        
        <input type="button" id="btn0" value="确定兑奖" style="margin-top: 20px;height:30px;width: 80px;border: none;border-radius: 3px;margin-right: 10px;color: #333;margin-bottom: 10px;">
    </div>
    </div>

    <div class="defeat" style="width: 80%;height: 36px;background: rgba(0,0,0,0.6);border-radius: 18px;position: fixed;bottom: 20px;left:50%;margin-left:-40%;line-height:36px;z-index: 999999;text-align: center;display: none;color: #fff">兑奖码错误，请重新输入</div>
    <div class="succeed" style="width: 80%;height: 36px;background:rgba(0,0,0,0.6);border-radius: 18px;position: fixed;bottom: 20px;left:50%;margin-left:-40%;line-height:36px;z-index: 999999;text-align: center;display: none;color: #fff;">兑奖成功，谢谢参与</div>

   
<!-- <div style="width:100%;height:100px;"></div>
<div class="menulist">
    <div class="menu-wrap">
        <div class="menu-container">
            <div class="menu_item menu_item1"><span></span>
                <a class="success" data-index="1" href="{php echo $this->createMobileUrl('messagesindex', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item1.png">
                    <s>发消息</s>
                </a>
            </div>
            <div class="menu_item menu_item6"><span></span>
                <a class="success" data-index="6" href="{php echo $this->createMobileUrl('index', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item6.png">
                    <s>流程</s>
                </a>
            </div>

            <div class="menu_item menu_item2"><span></span>
                <a class="success" data-index="5" href="{php echo $this->createMobileUrl('go_toupiao', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item2.png?v=42343">
                    <s>投票</s>
                </a>
            </div>

            <div class="menu_item menu_item4"><span></span>
                <a class="success" data-index="3" href="{php echo $this->createMobileUrl('qhbIndex', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item4.png">
                    <s>抢红包</s>
                </a>
            </div>
            
            <div class="menu_item menu_item5">
                <a class="success" data-index="4" href="{php echo $this->createMobileUrl('mybobing', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item5.png">
                    <s>我的</s>
                </a>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div> -->


    <script src="../addons/haoman_base/base/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../addons/haoman_dpm/mobimg/index.js?v=20161124170424"></script>
    

    <script type="text/javascript">

        $(document).ready(function(){
            //       提现申请
            var click = false;


                $("#butt").click(function () {
                    if (click) {
                        return false;
                    } else {
                        click = true;
                    {if $numx == 1}
                    alert('您提现次数大于每日提现次数，请明天在来提现！！')
                    location.href = "{php echo $this->createMobileUrl('mybobing', array('id' => $rid))}";
                    {else}
                        $("#butt").attr('disabled', true);
                        $("#butt").hide();
                    var content = $("#money").html()
                    var submitData1 = {
                        content: content,
                    };

                    $.post('{php echo $this->createMobileUrl('application', array('rid' => $rid,'from_user'=>$page_from_user))}', submitData1, function (data) {

                        if (data.success == 1) {
                            $(".succeed").show();
                            $(".succeed").html(data.msg);
                            setTimeout(function () {
                                $(".succeed").toggle();
                                location.href = "{php echo $this->createMobileUrl('mybobing', array('id' => $rid))}";
                            }, 2000)


                        } else {
                            $(".defeat").html(data.msg);
                            $(".defeat").show();

                            setTimeout(function () {
                                $(".defeat").toggle();
                                location.href = "{php echo $this->createMobileUrl('mybobing', array('id' => $rid))}";
                            }, 2000)
                        }

                    }, "json")
                    {/if}

                    }
                })


            $(".duijiang").bind("click", function () {
                $(".mask").show();
                $(".point").show();
                 $num = $(this).data("id");
               // $("#djtitle").html("您的兑奖码<br>"+num);
            });

             $("#btn0").on("click", function () {

                    var submitData = {
                        num:$num,
                        inputval:$(".numx").val(),
                    };

                    $.post('{php echo $this->createMobileUrl('duijiang', array('rid' => $rid,'from_user'=>$page_from_user))}', submitData, function(data) {
                        // alert($num);
                        if (data.success == 1) {

                            $(".mask").hide();
                            $(".point").hide();
                            $(".succeed").show();
                            setTimeout(function(){
                                $(".succeed").toggle();
                                location.href="{php echo $this->createMobileUrl('mybobing', array('id' => $rid))}";
                            },1000)
                        } else {

                            $(".numx").val("").focus();
                            $(".defeat").show();
                            setTimeout(function(){
                                $(".defeat").toggle();
                            },1000)
                        }
                    },"json")

                })
           
            // $("#btn0").on("click", function () {
            //     $(".mask").hide();
            //     $(".point").hide();
            // })
            $("#btn1").click(function(){
                $(".mask").hide();
                $(".point").hide();
            })
        })
    </script>

    {template 'm_footer'}
</body>

<!-- 微信分享设置 -->
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
    // JS分享借用权限开始

    // JS分享借用权限结束

    wx.config({
        debug:false,
        appId: '{$package["appId"]}',
        timestamp: '{$package["timestamp"]}',
        nonceStr: '{$package["nonceStr"]}',
        signature: '{$package["signature"]}',
        jsApiList: [
            'getLocation', {if $reply['share_type'] != 2}'onMenuShareTimeline','onMenuShareQQ','onMenuShareQZone','onMenuShareAppMessage','onMenuShareWeibo'{/if}
    ]
    });
    var sharedata = {
        "imgUrl" : "{$shareimg}",
        "link" : "{$sharelink}",
        "desc" : "{$sharedesc}",
        "title" : "{$sharetitle}"
    };

    wx.ready(function () {
        {if $reply['isallowip']==1}
        wx.getLocation({
            type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
            success: function (res) {

                var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
                var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
                var speed = res.speed; // 速度，以米/每秒计
                var accuracy = res.accuracy; // 位置精度



                var submitData = {
                    lat: latitude,
                    lon: longitude,
                    lbsip: "{$reply['allowip']}"
                };


                $.post('{php echo $this->createMobileUrl('getlbs',array('id' => $rid))}', submitData, function(idata) {

                    if (idata.success == 1) {

                    } else {
                        alert(idata.msg);
                        location.href = "{php echo $this->createMobileUrl('other', array('id' => $rid,'type'=>2))}";

                    }
                },"json");

            },
            fail: function () {
                alert("获取位置失败,请打开GPS功能！");
                location.href = "{php echo $this->createMobileUrl('index', array('id' => $rid))}";

            }
        });
        {/if}

        {if $reply['is_b_share'] == 2}
        wx.hideOptionMenu();
        {else}
        wx.showOptionMenu();
        wx.onMenuShareAppMessage(sharedata);
        wx.onMenuShareTimeline(sharedata);
        wx.onMenuShareQQ(sharedata);
        wx.onMenuShareQZone(sharedata);
        wx.onMenuShareWeibo(sharedata);
        {/if}
    });

</script>

</html>
